<html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>Table</title>
		<link rel="stylesheet" href="__STATIC__/plugins/layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="__CSS__/global.css" media="all">
		<link rel="stylesheet" href="__STATIC__/plugins/font-awesome/css/font-awesome.min.css">
		<link rel="stylesheet" href="__CSS__/table.css" />
	    <script type="text/javascript" charset="utf-8" src="__JS__/ueditor.config.js"></script>
	    <script type="text/javascript" charset="utf-8" src="__JS__/ueditor.all.min.js"> </script>
        <script type="text/javascript" charset="utf-8" src="__JS__/lang/zh-cn/zh-cn.js"></script>



	</head>
	<body>
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
				<legend>
				  	{if  condition="($arr.id)"}
			       
				编辑贷款
		  			{else/}
				添加贷款
		  			{/if}
			</legend>
		</fieldset>
		<form action="__ADMIN__/daikuan/add" method="post">
			<div class="layui-form-item">
					<label class="layui-form-label">ico:</label>
					<div class="layui-input-block">
						<input name="ico" id="ico" lay-verify="title" autocomplete="off" placeholder="" class="layui-input" value="{$arr.ico}" type="text">
				  	<button type="button" class="layui-btn test1"res = "ico" style="float: right;" >选择图片</button>
				  	<div id="ico_img">
				  		{if  condition="($arr.ico)"}
				  		<img src="__STATIC__/{$arr.ico}" url="{$arr.ico}" width="100px" height="100px">
				  		{/if}
				  	</div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">头部图:</label>
					<div class="layui-input-block">
						<input name="logo" id="logo" lay-verify="title" autocomplete="off" placeholder="" value="{$arr.logo}" class="layui-input" type="text">
				  	<button type="button" class="layui-btn test1"  res = "logo" style="float: right;" >选择图片</button>
				  	<div id="logo_img">
			  			{if  condition="($arr.logo)"}
				  		<img src="__STATIC__/{$arr.logo}" url="{$arr.logo}" width="100px" height="100px">
				  		{/if}
				  	</div>
					</div>
				</div>		
				<div class="layui-form-item">
					<label class="layui-form-label">奖金:</label>
					<div class="layui-input-block">
						<input name="jiangjin"  lay-verify="title" value="{$arr.jiangjin}"  autocomplete="off" placeholder="仅供前台显示使用。例如15元，，10%" class="layui-input" type="text">
				  	<div id="logo_img"></div>
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">佣金介绍</label>
					<div class="layui-input-block">
						<textarea class="content" name="yjjieshao" id="content">{$arr.yjjieshao}</textarea>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">贷款名称:</label>
					<div class="layui-input-block">
						<input name="name"  lay-verify="title" autocomplete="off" value="{$arr.name}" placeholder="输入描述" class="layui-input" type="text">
					</div>
				</div>	
					<div class="layui-form-item">
					<label class="layui-form-label">参考月息:</label>
					<div class="layui-input-block">
						<input name="rate"  lay-verify="title" autocomplete="off" value="{$arr.rate}" placeholder="" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">额度:</label>
					<div class="layui-input-block">
						<input name="edu"  lay-verify="title" autocomplete="off" value="{$arr.edu}" placeholder="" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">海报id:</label>
					<div class="layui-input-block">
						<input name="poster_id"  lay-verify="title" autocomplete="off" value="{$arr.poster_id}" placeholder="" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">下款速度:</label>
					<div class="layui-input-block">
						<input name="speed"  lay-verify="title" autocomplete="off" value="{$arr.speed}"  placeholder="" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">还款方式:</label>
					<div class="layui-input-block">
						<input name="huan"  lay-verify="title" autocomplete="off" value="{$arr.content.huan}"  placeholder="例如支付宝" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">贷款期限:</label>
					<div class="layui-input-block">
						<input name="qixian"  lay-verify="title" autocomplete="off" value="{$arr.content.qixian}"  placeholder="" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">贷款公司简介:</label>
					<div class="layui-input-block">
						<input name="jianjie"  lay-verify="title" autocomplete="off" value="{$arr.content.jianjie}"  placeholder="" class="layui-input" type="text">
					</div>
				</div>	
				<div class="layui-form-item">
					<label class="layui-form-label">贷款须知:</label>
					<div class="layui-input-block">
						<input name="xuzhi"  lay-verify="title" autocomplete="off" value="{$arr.content.xuzhi}" placeholder="例子：贷款成功后收取的任何费用与平台无关" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">财富热线:</label>
					<div class="layui-input-block">
						<input name="lianxi"  lay-verify="title" autocomplete="off" value="{$arr.content.lianxi}" placeholder="贷款平台客服电话" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">申请介绍</label>
					<div class="layui-input-block">
						<textarea class="content" name="jieshao" id="jieshao">{$arr.content.jieshao}</textarea>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">URL:</label>
					<div class="layui-input-block">
						<input name="url"  lay-verify="title" autocomplete="off" value="{$arr.url}" placeholder="填入完整url" class="layui-input" type="text">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">排序:</label>
					<div class="layui-input-block">
						<input name="rank"  lay-verify="title" autocomplete="off" value="{$arr.rank}" placeholder="越大越靠前" class="layui-input" type="text">
					</div>
				</div>
				  <div class="layui-form-item">
				    <label class="layui-form-label">是否发布</label>
				    <div class="layui-input-block">
				      <select name="status" lay-verify="required">
			  			{if  condition="($arr.status == 1)"}
  						 <option value="0" >否</option >
				        <option value="1" selected>是</option>
			  			{else/}

				        <option value="0" selected >否</option >
				        <option value="1">是</option>
			  			{/if}
				      
				      </select>
				    </div>
				  </div> 
				<input type="hidden" name="id" value="{$arr.id}">
				<div class="layui-input-block">
					<input type="submit" class="layui-btn" value="提交">
				</div>
		</form>
		<script type="text/javascript" src="__STATIC__/plugins/layui/layui.js"></script>
			<script type="text/javascript" src="__STATIC__/datas/nav.js"></script>	
			<script src="__JS__/index.js"></script>
		    <script src="__JS__/jquery.js"></script>
	</body>
</html>
<script >
	layui.config({
			base: '__STATIC__/plugins/layui/modules/'
		});

		layui.use(['form', 'layedit', 'laydate','icheck', 'laypage','layer'], function() {
		var 	layer = layui.layer,
			layedit = layui.layedit,
			laydate = layui.laydate;


		var editIndex = layedit.build('LAY_demo_editor');

		 $('.test1').on('click', function() {
		 	var type = $(this).attr("res");
			  layer.open({
			      type: 2,
				      title: '图片',
				      maxmin: true,
				      offset: 't',
				      anim: 2,
				      shadeClose: true, //点击遮罩关闭层
			      area : ['600px' , '520px'],
			      content: '__ADMIN__/bank/img?type='+type
			   });
		 });

		})

</script>
  <script type="text/javascript">
        UE.getEditor('content',{initialFrameWidth:800,initialFrameHeight:200})
        UE.getEditor('jieshao',{initialFrameWidth:800,initialFrameHeight:200})
</script>